<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>关键词搜索页面列表</title>
</head>
<body>
	<div>
		<ul>
			{% for list in contacts.object_list  %}
			<li>{{ list.song_name}}</li>
			<li>{{ list.song_singer}}</li>
			<li>{{ list.song_time}}</li>
			{% endfor %}
		</ul>
		<div>
			{% if contacts.has_previous %}
			    <a href="{% url 'music:search' contacts.previous_page_number %}" target="_self">上页</a>
			{% endif %}
			{% for page in contacts.paginator.page_range %}

				{% if contacts.number == page %}
					<span>{{page}}</span>
				{% else %}
					<a href="{% url 'music:search' page %}">{{page}}</a>
				{% endif %}
			{% endfor %}
			{% if contacts.has_next %}
			    <a href="{% url 'music:search' contacts.next_page_number %}" target="_self">下页</a>
			{% endif %}
		</div>
	</div>



</body>
</html>